package com.ygqh.baby.po;

import com.ygqh.baby.ao.DataStatus;
import com.ygqh.baby.ao.JobStatus;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class YgBargain implements Serializable {
    private static final long serialVersionUID = -7293550028619123232L;
    private Long id;

    private String activeName;

    private BigDecimal targetPrice;

    private Integer countDown;

    private Integer buyCount;

    private String generationMode;

    private Integer cardCountDown;

    private BigDecimal expressPrice;

    private String platformNo;

    private Date startDate;

    private Date endDate;

    private Boolean cutOnlyNew;

    private DataStatus status;

    private String createBy;

    private Date createTime;

    private String updateBy;

    private Date updateTime;


    public Integer getBuyCount() {
        return buyCount;
    }

    public void setBuyCount(Integer buyCount) {
        this.buyCount = buyCount;
    }

    public String getGenerationMode() {
        return generationMode;
    }

    public void setGenerationMode(String generationMode) {
        this.generationMode = generationMode;
    }

    public Integer getCardCountDown() {
        return cardCountDown;
    }

    public void setCardCountDown(Integer cardCountDown) {
        this.cardCountDown = cardCountDown;
    }

    public BigDecimal getExpressPrice() {
        return expressPrice;
    }

    public void setExpressPrice(BigDecimal expressPrice) {
        this.expressPrice = expressPrice;
    }

    public String getPlatformNo() {
        return platformNo;
    }

    public void setPlatformNo(String platformNo) {
        this.platformNo = platformNo;
    }

    public String getBargainStatus() {
        String jobStatus = JobStatus.Running.getTitle();
        Date currentDate = new Date();
        if (currentDate.before(startDate)) {
            jobStatus = JobStatus.UnStart.getTitle();
        } else if (currentDate.after(endDate)) {
            jobStatus = JobStatus.Complete.getTitle();
        }
        return jobStatus;

    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getActiveName() {
        return activeName;
    }

    public void setActiveName(String activeName) {
        this.activeName = activeName == null ? null : activeName.trim();
    }

    public BigDecimal getTargetPrice() {
        return targetPrice;
    }

    public void setTargetPrice(BigDecimal targetPrice) {
        this.targetPrice = targetPrice;
    }

    public Integer getCountDown() {
        return countDown;
    }

    public void setCountDown(Integer countDown) {
        this.countDown = countDown;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public DataStatus getStatus() {
        return status;
    }

    public void setStatus(DataStatus status) {
        this.status = status;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy == null ? null : createBy.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy == null ? null : updateBy.trim();
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Boolean getCutOnlyNew() {
        return cutOnlyNew;
    }

    public void setCutOnlyNew(Boolean cutOnlyNew) {
        this.cutOnlyNew = cutOnlyNew;
    }
}